//
//  ChatBaseInfoModel.m
//  Btpin
//
//  Created by Vic on 2019/4/7.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "ChatBaseInfoModel.h"

@implementation ChatBaseInfoModel

- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues {
    self.identifier = [UIToolsControl dataAnalysis:keyedValues[@"identifier"]];
    self.name = [UIToolsControl dataAnalysis:keyedValues[@"name"]];
    self.avatar = [UIToolsControl dataAnalysis:keyedValues[@"avatar"]];
    self.position = [UIToolsControl dataAnalysis:keyedValues[@"position"]];
    self.job_id = [UIToolsControl dataAnalysis:keyedValues[@"job_id"]];
    self.resume_id = [UIToolsControl dataAnalysis:keyedValues[@"resume_id"]];
    self.in_blacklist = [UIToolsControl dataAnalysis:keyedValues[@"in_blacklist"]];
    
    self.nav = [[ChatBaseInfoNavModel alloc] init];
    if (keyedValues[@"nav"]) {
        [self.nav setValuesForKeysWithDictionary:keyedValues[@"nav"]];
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

- (id)copyWithZone:(NSZone *)zone {
    ChatBaseInfoModel *model = [[[self class] allocWithZone:zone] init];
    model.identifier = self.identifier;
    model.name = self.name;
    model.avatar = self.avatar;
    model.position = self.position;
    model.job_id = self.job_id;
    model.resume_id = self.resume_id;
    model.in_blacklist = self.in_blacklist;
    model.nav = [self.nav copy];
    
    return model;
}

@end
